popover: Honor GtkContainer::border-width
authorCarlos Garnacho <carlosg@gnome.org>
Wed, 13 Nov 2013 10:02:47 +0000 (11:02 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Wed, 22 Jan 2014 16:10:05 +0000 (17:10 +0100)
The border width is now set around the contained widget.

gtk/gtkpopover.c

index 2f1157d8902befa557e5b6acbc8a9e4fecca9f65..b1380cbdee92c61d1974de5ea332ea77c04d3508 100644 (file)
@@ -613,17 +613,20 @@ get_padding_and_border (GtkWidget *widget,
 {
   GtkStyleContext *context;
   GtkStateFlags state;
+  gint border_width;
   GtkBorder tmp;
 
   context = gtk_widget_get_style_context (widget);
   state = gtk_widget_get_state_flags (widget);
 
+  border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
+
   gtk_style_context_get_padding (context, state, border);
   gtk_style_context_get_border (context, state, &tmp);
-  border->top += tmp.top;
-  border->right += tmp.right;
-  border->bottom += tmp.bottom;
-  border->left += tmp.left;
+  border->top += tmp.top + border_width;
+  border->right += tmp.right + border_width;
+  border->bottom += tmp.bottom + border_width;
+  border->left += tmp.left + border_width;
 }
 
 static void